package com.weigj.controller;

import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import com.weigj.intercepter.MyIntercepter;
import com.weigj.model.User;
@Before(MyIntercepter.class)
public class UserController extends Controller {
	public void index(){
		User user=new User().getUserById(193L);
		setAttr("user", user);
		//setSessionAttr("", "");
		render("/index.jsp");
	}
	public void query(){
		//获取user.param的参数
		User user=new User();
		user=getModel(User.class);
		System.out.println(user.getStr("contractNum")+"=======");
		//自定义属性赋值
		user.put("shiYear", getPara("shiYear"));
		setAttr("user", user);
		renderJsp("/index.jsp");
	}
}
